home *** CD-ROM | disk | FTP | other *** search
/ InterCD 2000 February / february_2000.iso / site building / GoLive 4.0 Tryout / data1.cab / Apps / Modules / JScripts / Actions / Multimedia / Play Sound.action < prev    next >
Encoding:
Text File  |  1999-08-05  |  3.6 KB  |  93 lines

  1. <html>
  2.  
  3.     <head>
  4.         <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
  5.         <meta name="generator" content="Adobe GoLive 4">
  6.         <title>Play Sound Action</title>
  7.     </head>
  8.  
  9.     <body bgcolor="white">
  10.         <center>
  11.             <font size="6">Play Sound Action</font><font>
  12.             <hr>
  13.             </font></center>
  14.         <div align="left">
  15.             <p>
  16.             <csactionclass name="Play Sound" function="CSPlaySound" nsversion="3" ieversion="4"> </p>
  17.         </div>
  18.         <p>
  19.         <csactionparam name="name" type="GLActionPlugInParam"> </p>
  20.         <p></csactionclass>
  21.          </p>
  22.         <p>
  23.         <script language="JavaScript1.2"><!--
  24. var CSLastSound = null
  25. function CSPlaySound(action) {
  26.     if(document.embeds[action[1]] != null) {
  27.         if (CSLastSound != null && CSLastSound != action[1])
  28.             document.embeds[CSLastSound].stop();
  29.         CSLastSound = action[1]
  30.         if (window.navigator.userAgent.indexOf("MSIE") > 0)
  31.             {
  32.             if (typeof(document.embeds[CSLastSound].run) != "undefined")
  33.                 document.embeds[CSLastSound].run();
  34.             }
  35.         else
  36.             {
  37.             if (typeof(document.embeds[CSLastSound].play) != "undefined")
  38.                 document.embeds[CSLastSound].play(true);
  39.             }
  40.     }
  41.     else
  42.     {
  43.     alert ("The current Plug-In can not be controlled by JavaScript. Please try using LiveAudio or a compatible Plug-In!");
  44.     }
  45. }
  46. // -->
  47.         </script>
  48.         <b>Play Sound.scpt</b> </p>
  49.         <p> </p>
  50.         <p>
  51.         <table cool width="253" height="153" border="0" cellpadding="0" cellspacing="0" gridx="16" showgridx gridy="16" showgridy bgcolor="#eeeeee">
  52.             <tr height="1" cntrlrow>
  53.                 <td width="1" height="1"><spacer type="block" width="1" height="1"></td>
  54.                 <td width="10" height="1"><spacer type="block" width="10" height="1"></td>
  55.                 <td width="80" height="1"><spacer type="block" width="80" height="1"></td>
  56.                 <td width="162" height="1"><spacer type="block" width="162" height="1"></td>
  57.             </tr>
  58.             <tr height="2">
  59.                 <td width="1" height="2"><spacer type="block" width="1" height="2"></td>
  60.                 <td width="10" height="2"><spacer type="block" width="10" height="2"></td>
  61.                 <td width="80" height="2"><spacer type="block" width="80" height="2"></td>
  62.                 <td width="162" height="2"><spacer type="block" width="162" height="2"></td>
  63.             </tr>
  64.             <tr height="3">
  65.                 <td width="1" height="3"><spacer type="block" width="1" height="3"></td>
  66.                 <td width="10" height="3"><spacer type="block" width="10" height="3"></td>
  67.                 <td width="80" height="3"><spacer type="block" width="80" height="3"></td>
  68.                 <td width="162" height="30" colspan="1" rowspan="2" valign="top" align="left" xpos="90">
  69.                     <csactioncntrl name="name" x="90" y="2" width="151" height="18" alignx="scale" aligny="top">
  70.                 </td>
  71.             </tr>
  72.             <tr height="27">
  73.                 <td width="1" height="27"><spacer type="block" width="1" height="27"></td>
  74.                 <td width="10" height="27"><spacer type="block" width="10" height="27"></td>
  75.                 <td width="80" height="27" colspan="1" rowspan="1" valign="top" align="left" xpos="10">
  76.                     <csactioncntrl type="StaticText" value="Name" x="10" y="5" width="39" height="16" alignx="left" aligny="top">
  77.                 </td>
  78.             </tr>
  79.             <tr height="120">
  80.                 <td width="1" height="120"><spacer type="block" width="1" height="120"></td>
  81.                 <td width="10" height="120"><spacer type="block" width="10" height="120"></td>
  82.                 <td width="242" height="120" colspan="2" rowspan="1" valign="top" align="left" xpos="10">
  83.                     <csactioncntrl type="InfoText" value="Plug-Ins need a name to be a target for this action.
  84. Please note that this action requires an audio plug-in that can be controlled by JavaScript." x="10" y="32" width="231" height="45" alignx="scale" aligny="top">
  85.                 </td>
  86.             </tr>
  87.         </table>
  88.         </p>
  89.         <p> 
  90.     </body>
  91.  
  92. </html>
  93.